﻿using System;
using mvcForum.Core.Abstractions.Interfaces;
using mvcForum.Web.Attributes;

namespace mvcForum.Web.Areas.ForumAdmin.ViewModels.Update {

	public class UserRegistrationViewModel {

		public UserRegistrationViewModel() { }
		public UserRegistrationViewModel(IConfiguration config) {
			this.Editable = config.Editable;
			this.UseForumAccountController = config.UseForumAccountController;
			this.AllowLocalUsers = config.AllowLocalUsers;
			this.AllowSignUp = config.AllowSignUp;
			this.RequireEmailValidation = config.RequireEmailValidation;
			this.AllowOpenAuthUsers = config.AllowOpenAuthUsers;
			this.ValidationSubject = config.ValidationSubject;
			this.ValidationBody = config.ValidationBody;
			this.RequireRulesAccept = config.RequireRulesAccept;
			this.SignUpRules = config.SignUpRules;
			this.ForgottenPasswordSubject = config.ForgottenPasswordSubject;
			this.ForgottenPasswordBody = config.ForgottenPasswordBody;
		}

		public Boolean Editable { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "UseForumAccountController")]
		public Boolean UseForumAccountController { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "AllowLocalUsers")]
		public Boolean AllowLocalUsers { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "AllowSignUp")]
		public Boolean AllowSignUp { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "RequireEmailValidation")]
		public Boolean RequireEmailValidation { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "AllowOpenAuthUsers")]
		public Boolean AllowOpenAuthUsers { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "ValidationSubject")]
		public String ValidationSubject { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "ValidationBody")]
		public String ValidationBody { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "ForgottenPasswordSubject")]
		public String ForgottenPasswordSubject { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "ForgottenPasswordBody")]
		public String ForgottenPasswordBody { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "RequireRulesAccept")]
		public Boolean RequireRulesAccept { get; set; }
		[LocalizedDisplay("MVCForum.Web.ViewModels.UserRegistrationViewModel", "SignUpRules")]
		public String SignUpRules { get; set; }
	}
}